package com.atguigu.gmall.feign.seckill;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.activity.SeckillGoods;
import com.atguigu.gmall.model.order.OrderInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

@RequestMapping("/rpc/inner/seckill")
@FeignClient("service-seckill")
public interface SecKillFeignClient {

    @PostMapping("/seckilllist")
    public Result<List<SeckillGoods>> getSecKillList();

    @GetMapping("/secKillDetails/{skuId}")
    public Result<SeckillGoods> getSecKillDetails(@PathVariable("skuId") Long skuId);

    @GetMapping("/orderInfo")
    public Result<OrderInfo> getSecKillOrderInfoFromRedis(@RequestParam("skuId") Long skuId);
}
